package cn.cheln.explorer.ds.scan;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;
import cn.cheln.explorer.ds.uri.NavigationPool;
import cn.cheln.support.log.Logs;
import com.direction.hold.ui.CountActivity;
import java.util.Stack;

public class ScanUpdateReceiver extends BroadcastReceiver
{
  public static final String ACTION_RECEIVER_SCAN = "com.lewa.app.filemanager.receiveScanSignal";
  public static final String ACTION_SCANNING = "com.lewa.app.filemanager.scanning";
  public static final String SCAN_FINISHED = "scanFinished";
  public static final String SCAN_FINISHED_TOAST = "scanFinishedToast";
  public static final String SCAN_TYPE = "scan_type";
  private Activity countActivity;

  public ScanUpdateReceiver(Activity paramActivity)
  {
    this.countActivity = paramActivity;
  }

  public void onReceive(Context paramContext, Intent paramIntent)
  {
    if ((!(paramIntent.getAction().equals("android.intent.action.MEDIA_SCANNER_FINISHED"))) && (!(paramIntent.getAction().equals("com.lewa.app.filemanager.receiveScanSignal"))))
      return;
    Logs.i("receiveScanSignal--------->");
    if (CountActivity.categoryActivity == null)
      return;
    CountActivity.categoryActivity.refresh();
    if (!(paramIntent.getBooleanExtra("scanFinished", false)))
      return;
    Logs.i("receiveScanSignal---------> scan finished");
    CountActivity.categoryActivity.setScanBarHide(true);
    CountActivity.categoryActivity.hideScanBar(8);
    String str = paramIntent.getStringExtra("scanFinishedToast");
    this.countActivity.stopService(new Intent(paramContext, ScanService.class));
    Logs.i("toast =======================================> " + str);
    if ((str == null) || (str.trim().equals("")) || (CountActivity.categoryActivity.navTool.navEntity.size() <= 1))
      return;
    Toast.makeText(paramContext, str, 1).show();
  }
}

/* Location:           H:\360云盘\lewa_explorer_3.0\bin\FileApp_orig_dex2jar.jar
 * Qualified Name:     cn.cheln.explorer.ds.scan.ScanUpdateReceiver
 * JD-Core Version:    0.5.2
 */